package com.bsoft.gol.editor.editor;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * @program: Myproject
 * @description:
 * @author: zangsf
 * @create: 2022-12-08 15:28
 **/
@Entity
@Table(name = "editor_questionnaire_official")
public class EditorQuestionnaireOfficial {
    private String officialId;
    private String questionnaireId;
    private String scoreAround;
    private String officialContent;
    private Date createTime;
    private String createUser;
    private Date alterTime;
    private String alterUser;
    private String processMode;

    @Id
    @Column(name = "official_id", nullable = false, length = 40)
    public String getOfficialId() {
        return officialId;
    }

    public void setOfficialId(String officialId) {
        this.officialId = officialId;
    }

    @Basic
    @Column(name = "questionnaire_id", nullable = true, length = 64)
    public String getQuestionnaireId() {
        return questionnaireId;
    }

    public void setQuestionnaireId(String questionnaireId) {
        this.questionnaireId = questionnaireId;
    }

    @Basic
    @Column(name = "score_around", nullable = true, length = 255)
    public String getScoreAround() {
        return scoreAround;
    }

    public void setScoreAround(String scoreAround) {
        this.scoreAround = scoreAround;
    }

    @Basic
    @Column(name = "official_content", nullable = true, length = 1000)
    public String getOfficialContent() {
        return officialContent;
    }

    public void setOfficialContent(String officialContent) {
        this.officialContent = officialContent;
    }

    @Basic
    @Column(name = "create_time", nullable = true)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "create_user", nullable = true, length = 40)
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Basic
    @Column(name = "alter_time", nullable = true)
    public Date getAlterTime() {
        return alterTime;
    }

    public void setAlterTime(Date alterTime) {
        this.alterTime = alterTime;
    }

    @Basic
    @Column(name = "alter_user", nullable = true, length = 40)
    public String getAlterUser() {
        return alterUser;
    }

    public void setAlterUser(String alterUser) {
        this.alterUser = alterUser;
    }
    
    @Basic
    @Column(name = "process_mode", nullable = true, length = 40)
    public String getProcessMode() {
        return processMode;
    }

    public void setProcessMode(String processMode) {
        this.processMode = processMode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        EditorQuestionnaireOfficial that = (EditorQuestionnaireOfficial) o;
        return Objects.equals(officialId, that.officialId) &&
                Objects.equals(questionnaireId, that.questionnaireId) &&
                Objects.equals(scoreAround, that.scoreAround) &&
                Objects.equals(officialContent, that.officialContent) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(createUser, that.createUser) &&
                Objects.equals(alterTime, that.alterTime) &&
                Objects.equals(alterUser, that.alterUser);
    }

    @Override
    public int hashCode() {
        return Objects.hash(officialId, questionnaireId, scoreAround, officialContent, createTime, createUser, alterTime, alterUser);
    }
}
